home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / biblio / bibtex / contrib / bstfiles.zoo / is-plain.bst < prev    next >
Text File  |  1991-09-12  |  25KB  |  1,326 lines

  1. %% =====================================================================
  2. %% WARNING: Do NOT edit this file.  It was produced automatically by
  3. %% Nelson H. F. Beebe <beebe@magna.math.utah.edu>
  4. %% from /home/csc-sun/a/sy/beebe/tex/bib/merge/xbtxbst.doc 
  5. %% on Thu Sep 12 10:55:28 MDT 1991
  6. %% =====================================================================
  7.  
  8.  
  9. %% =====================================================================
  10. %%  @BibTeX-style-file{
  11. %%      author          = "Nelson H. F. Beebe",
  12. %%      version         = "1.02",
  13. %%      date            = "12 September 1991",
  14. %%      filename        = "is-plain.bst",
  15. %%      address         = "Center for Scientific Computing
  16. %%                         Department of Mathematics
  17. %%                         South Physics Building
  18. %%                         University of Utah
  19. %%                         Salt Lake City, UT 84112
  20. %%                         USA
  21. %%                         Tel: (801) 581-5254",
  22. %%      checksum        = "23731 1325 3010 24682",
  23. %%      email           = "beebe@math.utah.edu (Internet)",
  24. %%      codetable       = "ISO/ASCII",
  25. %%      keywords        = "BibTeX, style, bibliography",
  26. %%      supported       = "yes",
  27. %%      docstring       = "This file is a modification of the standard
  28. %%                         BibTeX btxbst.doc file, or is a .bst file
  29. %%                         derived from that modification.  It contains
  30. %%                         added support for ISBN and ISSN fields, as
  31. %%                         well as for the PERIODICAL entry.  The UNIX C
  32. %%                         preprocessor can be used to extract the
  33. %%                         extensions of the standard styles, as
  34. %%                         follows:
  35. %%
  36. %%                         cpp -P -DPLAIN xbtxbst.doc is-plain.txt
  37. %%                         cpp -P -DUNSRT xbtxbst.doc is-unsrt.txt
  38. %%                         cpp -P -DALPHA xbtxbst.doc is-alpha.txt
  39. %%                         cpp -P -DABBRV xbtxbst.doc is-abbrv.txt
  40. %%
  41. %%                         If desired, a sed script can be used to
  42. %%                         eliminate non-essential comments (this
  43. %%                         reduces the file size by 2/3); a command
  44. %%                         filter step like
  45. %%                                 sed -e '/^%$/d' -e '/^%[^%].*$/d'
  46. %%                         will accomplish that job.
  47. %%
  48. %%                         The checksum field above contains a CRC-16
  49. %%                         checksum as the first value, followed by the
  50. %%                         equivalent of the standard UNIX wc (word
  51. %%                         count) utility output of lines, words, and
  52. %%                         characters.  This is produced by Robert
  53. %%                         Solovay's checksum utility."
  54. %%      }
  55. %% =====================================================================
  56. %% Revision history (reverse time order):
  57. %% 1.02 [12-Sep-1991]
  58. %%      Merge in Barbara N. Beeton's suggestion for hyphen-less
  59. %%      line breaks around volume(number):page.
  60. %% 1.01 [10-Sep-1991]
  61. %%      Update file comment header and use Solovay checksum program.
  62. %% 1.00 [17-Oct-1990]
  63. %%      Original version merging hand-edits of is-xxx.bst files into
  64. %%      this master file, xbtxbst.doc.
  65.  
  66.  
  67. %% BibTeX `plain' family
  68. %%       version 0.99b for BibTeX versions 0.99a or later, LaTeX version 2.09.
  69. %%       Copyright (C) 1985, all rights reserved.
  70. %%       Copying of this file is authorized only if either
  71. %%       (1) you make absolutely no changes to your copy, including name, or
  72. %%       (2) if you do make changes, you name it something other than
  73. %%       btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
  74. %%       This restriction helps ensure that all standard styles are identical.
  75. %%       The file btxbst.doc has the documentation for this style.
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95. ENTRY
  96.   { address
  97.     author
  98.     booktitle
  99.     chapter
  100.     edition
  101.     editor
  102.     howpublished
  103.     institution
  104.     isbn
  105.     issn
  106.     journal
  107.     key
  108.     month
  109.     note
  110.     number
  111.     organization
  112.     pages
  113.     publisher
  114.     school
  115.     series
  116.     title
  117.     type
  118.     volume
  119.     year
  120.   }
  121.   {}
  122.  
  123.   { label }
  124.  
  125.  
  126.  
  127. INTEGERS { output.state before.all mid.sentence after.sentence after.block }
  128.  
  129. FUNCTION {init.state.consts}
  130. { #0 'before.all :=
  131.   #1 'mid.sentence :=
  132.   #2 'after.sentence :=
  133.   #3 'after.block :=
  134. }
  135.  
  136.  
  137. STRINGS { s t }
  138.  
  139. FUNCTION {output.nonnull}
  140. { 's :=
  141.   output.state mid.sentence =
  142.     { ", " * write$ }
  143.     { output.state after.block =
  144.         { add.period$ write$
  145.           newline$
  146.           "\newblock " write$
  147.         }
  148.         { output.state before.all =
  149.             'write$
  150.             { add.period$ " " * write$ }
  151.           if$
  152.         }
  153.       if$
  154.       mid.sentence 'output.state :=
  155.     }
  156.   if$
  157.   s
  158. }
  159.  
  160. FUNCTION {output}
  161. { duplicate$ empty$
  162.     'pop$
  163.     'output.nonnull
  164.   if$
  165. }
  166.  
  167. FUNCTION {output.check}
  168. { 't :=
  169.   duplicate$ empty$
  170.     { pop$ "empty " t * " in " * cite$ * warning$ }
  171.     'output.nonnull
  172.   if$
  173. }
  174.  
  175. FUNCTION {output.bibitem}
  176. { newline$
  177.  
  178.   "\bibitem{" write$
  179.  
  180.   cite$ write$
  181.   "}" write$
  182.   newline$
  183.   ""
  184.   before.all 'output.state :=
  185. }
  186.  
  187.  
  188. FUNCTION {fin.entry}
  189. { add.period$
  190.   write$
  191.   newline$
  192. }
  193.  
  194. FUNCTION {new.block}
  195. { output.state before.all =
  196.     'skip$
  197.     { after.block 'output.state := }
  198.   if$
  199. }
  200.  
  201. FUNCTION {new.sentence}
  202. { output.state after.block =
  203.     'skip$
  204.     { output.state before.all =
  205.         'skip$
  206.         { after.sentence 'output.state := }
  207.       if$
  208.     }
  209.   if$
  210. }
  211.  
  212.  
  213. FUNCTION {not}
  214. {   { #0 }
  215.     { #1 }
  216.   if$
  217. }
  218.  
  219. FUNCTION {and}
  220. {   'skip$
  221.     { pop$ #0 }
  222.   if$
  223. }
  224.  
  225. FUNCTION {or}
  226. {   { pop$ #1 }
  227.     'skip$
  228.   if$
  229. }
  230.  
  231.  
  232. FUNCTION {new.block.checka}
  233. { empty$
  234.     'skip$
  235.     'new.block
  236.   if$
  237. }
  238.  
  239. FUNCTION {new.block.checkb}
  240. { empty$
  241.   swap$ empty$
  242.   and
  243.     'skip$
  244.     'new.block
  245.   if$
  246. }
  247.  
  248.  
  249. FUNCTION {new.sentence.checka}
  250. { empty$
  251.     'skip$
  252.     'new.sentence
  253.   if$
  254. }
  255.  
  256. FUNCTION {new.sentence.checkb}
  257. { empty$
  258.   swap$ empty$
  259.   and
  260.     'skip$
  261.     'new.sentence
  262.   if$
  263. }
  264.  
  265.  
  266. FUNCTION {field.or.null}
  267. { duplicate$ empty$
  268.     { pop$ "" }
  269.     'skip$
  270.   if$
  271. }
  272.  
  273. FUNCTION {emphasize}
  274. { duplicate$ empty$
  275.     { pop$ "" }
  276.     { "{\em " swap$ * "}" * }
  277.   if$
  278. }
  279.  
  280. INTEGERS { nameptr namesleft numnames }
  281.  
  282. FUNCTION {format.names}
  283. { 's :=
  284.   #1 'nameptr :=
  285.   s num.names$ 'numnames :=
  286.   numnames 'namesleft :=
  287.     { namesleft #0 > }
  288.  
  289.     { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
  290.  
  291.       nameptr #1 >
  292.         { namesleft #1 >
  293.             { ", " * t * }
  294.             { numnames #2 >
  295.                 { "," * }
  296.                 'skip$
  297.               if$
  298.               t "others" =
  299.                 { " et~al." * }
  300.                 { " and " * t * }
  301.               if$
  302.             }
  303.           if$
  304.         }
  305.         't
  306.       if$
  307.       nameptr #1 + 'nameptr :=
  308.       namesleft #1 - 'namesleft :=
  309.     }
  310.   while$
  311. }
  312.  
  313. FUNCTION {format.authors}
  314. { author empty$
  315.     { "" }
  316.     { author format.names }
  317.   if$
  318. }
  319.  
  320. FUNCTION {format.editors}
  321. { editor empty$
  322.     { "" }
  323.     { editor format.names
  324.       editor num.names$ #1 >
  325.         { ", editors" * }
  326.         { ", editor" * }
  327.       if$
  328.     }
  329.   if$
  330. }
  331.  
  332. FUNCTION {format.isbn}
  333. { isbn empty$
  334.     { "" }
  335.     { new.block "ISBN " isbn * }
  336.   if$
  337. }
  338.  
  339. FUNCTION {format.issn}
  340. { issn empty$
  341.     { "" }
  342.     { new.block "ISSN " issn * }
  343.   if$
  344. }
  345.  
  346.  
  347. FUNCTION {format.title}
  348. { title empty$
  349.     { "" }
  350.  
  351.     { title "t" change.case$ }
  352.  
  353.   if$
  354. }
  355.  
  356.  
  357.  
  358. FUNCTION {n.dashify}
  359. { 't :=
  360.   ""
  361.     { t empty$ not }
  362.     { t #1 #1 substring$ "-" =
  363.         { t #1 #2 substring$ "--" = not
  364.             { "--" *
  365.               t #2 global.max$ substring$ 't :=
  366.             }
  367.             {   { t #1 #1 substring$ "-" = }
  368.                 { "-" *
  369.                   t #2 global.max$ substring$ 't :=
  370.                 }
  371.               while$
  372.             }
  373.           if$
  374.         }
  375.         { t #1 #1 substring$ *
  376.           t #2 global.max$ substring$ 't :=
  377.         }
  378.       if$
  379.     }
  380.   while$
  381. }
  382.  
  383.  
  384. FUNCTION {format.date}
  385. { year empty$
  386.     { month empty$
  387.         { "" }
  388.         { "there's a month but no year in " cite$ * warning$
  389.           month
  390.         }
  391.       if$
  392.     }
  393.     { month empty$
  394.         'year
  395.         { month " " * year * }
  396.       if$
  397.     }
  398.   if$
  399. }
  400.  
  401.  
  402. FUNCTION {format.btitle}
  403. { title emphasize
  404. }
  405.  
  406.  
  407. FUNCTION {tie.or.space.connect}
  408. { duplicate$ text.length$ #3 <
  409.     { "~" }
  410.     { " " }
  411.   if$
  412.   swap$ * *
  413. }
  414.  
  415.  
  416. FUNCTION {either.or.check}
  417. { empty$
  418.     'pop$
  419.     { "can't use both " swap$ * " fields in " * cite$ * warning$ }
  420.   if$
  421. }
  422.  
  423.  
  424. FUNCTION {format.bvolume}
  425. { volume empty$
  426.     { "" }
  427.     { "volume" volume tie.or.space.connect
  428.       series empty$
  429.         'skip$
  430.         { " of " * series emphasize * }
  431.       if$
  432.       "volume and number" number either.or.check
  433.     }
  434.   if$
  435. }
  436.  
  437.  
  438. FUNCTION {format.number.series}
  439. { volume empty$
  440.     { number empty$
  441.         { series field.or.null }
  442.         { output.state mid.sentence =
  443.             { "number" }
  444.             { "Number" }
  445.           if$
  446.           number tie.or.space.connect
  447.           series empty$
  448.             { "there's a number but no series in " cite$ * warning$ }
  449.             { " in " * series * }
  450.           if$
  451.         }
  452.       if$
  453.     }
  454.     { "" }
  455.   if$
  456. }
  457.  
  458.  
  459. FUNCTION {format.edition}
  460. { edition empty$
  461.     { "" }
  462.     { output.state mid.sentence =
  463.         { edition "l" change.case$ " edition" * }
  464.         { edition "t" change.case$ " edition" * }
  465.       if$
  466.     }
  467.   if$
  468. }
  469.  
  470.  
  471. INTEGERS { multiresult }
  472.  
  473. FUNCTION {multi.page.check}
  474. { 't :=
  475.   #0 'multiresult :=
  476.     { multiresult not
  477.       t empty$ not
  478.       and
  479.     }
  480.     { t #1 #1 substring$
  481.       duplicate$ "-" =
  482.       swap$ duplicate$ "," =
  483.       swap$ "+" =
  484.       or or
  485.         { #1 'multiresult := }
  486.         { t #2 global.max$ substring$ 't := }
  487.       if$
  488.     }
  489.   while$
  490.   multiresult
  491. }
  492.  
  493.  
  494. FUNCTION {format.pages}
  495. { pages empty$
  496.     { "" }
  497.     { pages multi.page.check
  498.         { "pages" pages n.dashify tie.or.space.connect }
  499.         { "page" pages tie.or.space.connect }
  500.       if$
  501.     }
  502.   if$
  503. }
  504.  
  505.  
  506. FUNCTION {format.vol.num.pages}
  507. { volume field.or.null
  508.   number empty$
  509.     'skip$
  510.     { "\penalty0 (" number * ")" * *
  511.       volume empty$
  512.         { "there's a number but no volume in " cite$ * warning$ }
  513.         'skip$
  514.       if$
  515.     }
  516.   if$
  517.   pages empty$
  518.     'skip$
  519.     { duplicate$ empty$
  520.         { pop$ format.pages }
  521.         { ":\penalty0 " * pages n.dashify * }
  522.       if$
  523.     }
  524.   if$
  525. }
  526.  
  527.  
  528.  
  529. FUNCTION {format.chapter.pages}
  530. { chapter empty$
  531.     'format.pages
  532.     { type empty$
  533.         { "chapter" }
  534.         { type "l" change.case$ }
  535.       if$
  536.       chapter tie.or.space.connect
  537.       pages empty$
  538.         'skip$
  539.         { ", " * format.pages * }
  540.       if$
  541.     }
  542.   if$
  543. }
  544.  
  545.  
  546. FUNCTION {format.in.ed.booktitle}
  547. { booktitle empty$
  548.     { "" }
  549.     { editor empty$
  550.         { "In " booktitle emphasize * }
  551.         { "In " format.editors * ", " * booktitle emphasize * }
  552.       if$
  553.     }
  554.   if$
  555. }
  556.  
  557.  
  558. FUNCTION {empty.misc.check}
  559. { author empty$ title empty$ howpublished empty$
  560.   month empty$ year empty$ note empty$
  561.   and and and and and
  562.  
  563.   key empty$ not and
  564.  
  565.     { "all relevant fields are empty in " cite$ * warning$ }
  566.     'skip$
  567.   if$
  568. }
  569.  
  570.  
  571. FUNCTION {format.thesis.type}
  572. { type empty$
  573.     'skip$
  574.     { pop$
  575.       type "t" change.case$
  576.     }
  577.   if$
  578. }
  579.  
  580.  
  581. FUNCTION {format.tr.number}
  582. { type empty$
  583.     { "Technical Report" }
  584.     'type
  585.   if$
  586.   number empty$
  587.     { "t" change.case$ }
  588.     { number tie.or.space.connect }
  589.   if$
  590. }
  591.  
  592.  
  593. FUNCTION {format.article.crossref}
  594. { key empty$
  595.     { journal empty$
  596.         { "need key or journal for " cite$ * " to crossref " * crossref *
  597.           warning$
  598.           ""
  599.         }
  600.         { "In {\em " journal * "\/}" * }
  601.       if$
  602.     }
  603.     { "In " key * }
  604.   if$
  605.   " \cite{" * crossref * "}" *
  606. }
  607.  
  608.  
  609. FUNCTION {format.crossref.editor}
  610. { editor #1 "{vv~}{ll}" format.name$
  611.   editor num.names$ duplicate$
  612.   #2 >
  613.     { pop$ " et~al." * }
  614.     { #2 <
  615.         'skip$
  616.         { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
  617.             { " et~al." * }
  618.             { " and " * editor #2 "{vv~}{ll}" format.name$ * }
  619.           if$
  620.         }
  621.       if$
  622.     }
  623.   if$
  624. }
  625.  
  626.  
  627. FUNCTION {format.book.crossref}
  628. { volume empty$
  629.     { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
  630.       "In "
  631.     }
  632.     { "Volume" volume tie.or.space.connect
  633.       " of " *
  634.     }
  635.   if$
  636.   editor empty$
  637.   editor field.or.null author field.or.null =
  638.   or
  639.     { key empty$
  640.         { series empty$
  641.             { "need editor, key, or series for " cite$ * " to crossref " *
  642.               crossref * warning$
  643.               "" *
  644.             }
  645.             { "{\em " * series * "\/}" * }
  646.           if$
  647.         }
  648.         { key * }
  649.       if$
  650.     }
  651.     { format.crossref.editor * }
  652.   if$
  653.   " \cite{" * crossref * "}" *
  654. }
  655.  
  656.  
  657. FUNCTION {format.incoll.inproc.crossref}
  658. { editor empty$
  659.   editor field.or.null author field.or.null =
  660.   or
  661.     { key empty$
  662.         { booktitle empty$
  663.             { "need editor, key, or booktitle for " cite$ * " to crossref " *
  664.               crossref * warning$
  665.               ""
  666.             }
  667.             { "In {\em " booktitle * "\/}" * }
  668.           if$
  669.         }
  670.         { "In " key * }
  671.       if$
  672.     }
  673.     { "In " format.crossref.editor * }
  674.   if$
  675.   " \cite{" * crossref * "}" *
  676. }
  677.  
  678.  
  679. FUNCTION {article}
  680. { output.bibitem
  681.   format.authors "author" output.check
  682.   new.block
  683.   format.title "title" output.check
  684.   new.block
  685.   crossref missing$
  686.     { journal emphasize "journal" output.check
  687.       format.vol.num.pages output
  688.       format.date "year" output.check
  689.     }
  690.     { format.article.crossref output.nonnull
  691.       format.pages output
  692.     }
  693.   if$
  694.   new.block
  695.   note output
  696.   fin.entry
  697. }
  698.  
  699. FUNCTION {book}
  700. { output.bibitem
  701.   author empty$
  702.     { format.editors "author and editor" output.check }
  703.     { format.authors output.nonnull
  704.       crossref missing$
  705.         { "author and editor" editor either.or.check }
  706.         'skip$
  707.       if$
  708.     }
  709.   if$
  710.   new.block
  711.   format.btitle "title" output.check
  712.   crossref missing$
  713.     { format.bvolume output
  714.       new.block
  715.       format.number.series output
  716.       new.sentence
  717.       publisher "publisher" output.check
  718.       address output
  719.     }
  720.     { new.block
  721.       format.book.crossref output.nonnull
  722.     }
  723.   if$
  724.   format.edition output
  725.   format.date "year" output.check
  726.   format.isbn output
  727.   new.block
  728.   note output
  729.   fin.entry
  730. }
  731.  
  732.  
  733. FUNCTION {booklet}
  734. { output.bibitem
  735.   format.authors output
  736.   new.block
  737.   format.title "title" output.check
  738.   howpublished address new.block.checkb
  739.   howpublished output
  740.   address output
  741.   format.date output
  742.   format.isbn output
  743.   new.block
  744.   note output
  745.   fin.entry
  746. }
  747.  
  748.  
  749.  
  750. FUNCTION {inbook}
  751. { output.bibitem
  752.   author empty$
  753.     { format.editors "author and editor" output.check }
  754.     { format.authors output.nonnull
  755.       crossref missing$
  756.         { "author and editor" editor either.or.check }
  757.         'skip$
  758.       if$
  759.     }
  760.   if$
  761.   new.block
  762.   format.btitle "title" output.check
  763.   crossref missing$
  764.     { format.bvolume output
  765.       format.chapter.pages "chapter and pages" output.check
  766.       new.block
  767.       format.number.series output
  768.       new.sentence
  769.       publisher "publisher" output.check
  770.       address output
  771.     }
  772.     { format.chapter.pages "chapter and pages" output.check
  773.       new.block
  774.       format.book.crossref output.nonnull
  775.     }
  776.   if$
  777.   format.edition output
  778.   format.date "year" output.check
  779.   format.isbn output
  780.   new.block
  781.   note output
  782.   fin.entry
  783. }
  784.  
  785.  
  786. FUNCTION {incollection}
  787. { output.bibitem
  788.   format.authors "author" output.check
  789.   new.block
  790.   format.title "title" output.check
  791.   new.block
  792.   crossref missing$
  793.     { format.in.ed.booktitle "booktitle" output.check
  794.       format.bvolume output
  795.       format.number.series output
  796.       format.chapter.pages output
  797.       new.sentence
  798.       publisher "publisher" output.check
  799.       address output
  800.       format.edition output
  801.       format.date "year" output.check
  802.     }
  803.     { format.incoll.inproc.crossref output.nonnull
  804.       format.chapter.pages output
  805.     }
  806.   if$
  807.   format.isbn output
  808.   new.block
  809.   note output
  810.   fin.entry
  811. }
  812.  
  813.  
  814. FUNCTION {inproceedings}
  815. { output.bibitem
  816.   format.authors "author" output.check
  817.   new.block
  818.   format.title "title" output.check
  819.   new.block
  820.   crossref missing$
  821.     { format.in.ed.booktitle "booktitle" output.check
  822.       format.bvolume output
  823.       format.number.series output
  824.       format.pages output
  825.       address empty$
  826.         { organization publisher new.sentence.checkb
  827.           organization output
  828.           publisher output
  829.           format.date "year" output.check
  830.         }
  831.         { address output.nonnull
  832.           format.date "year" output.check
  833.           new.sentence
  834.           organization output
  835.           publisher output
  836.         }
  837.       if$
  838.     }
  839.     { format.incoll.inproc.crossref output.nonnull
  840.       format.pages output
  841.     }
  842.   if$
  843.   format.isbn output
  844.   new.block
  845.   note output
  846.   fin.entry
  847. }
  848.  
  849.  
  850. FUNCTION {conference} { inproceedings }
  851.  
  852.  
  853. FUNCTION {manual}
  854. { output.bibitem
  855.   author empty$
  856.     { organization empty$
  857.         'skip$
  858.         { organization output.nonnull
  859.           address output
  860.         }
  861.       if$
  862.     }
  863.     { format.authors output.nonnull }
  864.   if$
  865.   new.block
  866.   format.btitle "title" output.check
  867.   author empty$
  868.     { organization empty$
  869.         { address new.block.checka
  870.           address output
  871.         }
  872.         'skip$
  873.       if$
  874.     }
  875.     { organization address new.block.checkb
  876.       organization output
  877.       address output
  878.     }
  879.   if$
  880.   format.edition output
  881.   format.date output
  882.   new.block
  883.   note output
  884.   fin.entry
  885. }
  886.  
  887.  
  888. FUNCTION {mastersthesis}
  889. { output.bibitem
  890.   format.authors "author" output.check
  891.   new.block
  892.   format.title "title" output.check
  893.   new.block
  894.   "Master's thesis" format.thesis.type output.nonnull
  895.   school "school" output.check
  896.   address output
  897.   format.date "year" output.check
  898.   new.block
  899.   note output
  900.   fin.entry
  901. }
  902.  
  903.  
  904. FUNCTION {misc}
  905. { output.bibitem
  906.   format.authors output
  907.   title howpublished new.block.checkb
  908.   format.title output
  909.   howpublished new.block.checka
  910.   howpublished output
  911.   format.date output
  912.   format.issn output
  913.   new.block
  914.   note output
  915.   fin.entry
  916.   empty.misc.check
  917. }
  918.  
  919.  
  920. FUNCTION {phdthesis}
  921. { output.bibitem
  922.   format.authors "author" output.check
  923.   new.block
  924.   format.btitle "title" output.check
  925.   new.block
  926.   "PhD thesis" format.thesis.type output.nonnull
  927.   school "school" output.check
  928.   address output
  929.   format.date "year" output.check
  930.   new.block
  931.   note output
  932.   fin.entry
  933. }
  934.  
  935.  
  936. FUNCTION {periodical}
  937. { output.bibitem
  938.   editor empty$
  939.     { organization output }
  940.     { format.editors output.nonnull }
  941.   if$
  942.   new.block
  943.   title emphasize "title" output.check
  944.   format.vol.num.pages output
  945.   format.date output
  946.   format.issn output
  947.   new.sentence
  948.   publisher output
  949.   address output
  950.   howpublished new.block.checka
  951.   howpublished output
  952.   new.block
  953.   note output
  954.   fin.entry
  955. }
  956.  
  957.  
  958. FUNCTION {proceedings}
  959. { output.bibitem
  960.   editor empty$
  961.     { organization output }
  962.     { format.editors output.nonnull }
  963.   if$
  964.   new.block
  965.   format.btitle "title" output.check
  966.   format.bvolume output
  967.   format.number.series output
  968.   address empty$
  969.     { editor empty$
  970.         { publisher new.sentence.checka }
  971.         { organization publisher new.sentence.checkb
  972.           organization output
  973.         }
  974.       if$
  975.       publisher output
  976.       format.date "year" output.check
  977.     }
  978.     { address output.nonnull
  979.       format.date "year" output.check
  980.       new.sentence
  981.       editor empty$
  982.         'skip$
  983.         { organization output }
  984.       if$
  985.       publisher output
  986.     }
  987.   if$
  988.   format.isbn output
  989.   new.block
  990.   note output
  991.   fin.entry
  992. }
  993.  
  994.  
  995. FUNCTION {techreport}
  996. { output.bibitem
  997.   format.authors "author" output.check
  998.   new.block
  999.   format.title "title" output.check
  1000.   new.block
  1001.   format.tr.number output.nonnull
  1002.   institution "institution" output.check
  1003.   address output
  1004.   format.date "year" output.check
  1005.   new.block
  1006.   note output
  1007.   fin.entry
  1008. }
  1009.  
  1010.  
  1011. FUNCTION {unpublished}
  1012. { output.bibitem
  1013.   format.authors "author" output.check
  1014.   new.block
  1015.   format.title "title" output.check
  1016.   new.block
  1017.   note "note" output.check
  1018.   format.date output
  1019.   fin.entry
  1020. }
  1021.  
  1022.  
  1023. FUNCTION {default.type} { misc }
  1024.  
  1025.  
  1026.  
  1027.  
  1028. MACRO {jan} {"January"}
  1029.  
  1030. MACRO {feb} {"February"}
  1031.  
  1032. MACRO {mar} {"March"}
  1033.  
  1034. MACRO {apr} {"April"}
  1035.  
  1036. MACRO {may} {"May"}
  1037.  
  1038. MACRO {jun} {"June"}
  1039.  
  1040. MACRO {jul} {"July"}
  1041.  
  1042. MACRO {aug} {"August"}
  1043.  
  1044. MACRO {sep} {"September"}
  1045.  
  1046. MACRO {oct} {"October"}
  1047.  
  1048. MACRO {nov} {"November"}
  1049.  
  1050. MACRO {dec} {"December"}
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057. MACRO {acmcs} {"ACM Computing Surveys"}
  1058.  
  1059. MACRO {acta} {"Acta Informatica"}
  1060.  
  1061. MACRO {cacm} {"Communications of the ACM"}
  1062.  
  1063. MACRO {ibmjrd} {"IBM Journal of Research and Development"}
  1064.  
  1065. MACRO {ibmsj} {"IBM Systems Journal"}
  1066.  
  1067. MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
  1068.  
  1069. MACRO {ieeetc} {"IEEE Transactions on Computers"}
  1070.  
  1071. MACRO {ieeetcad}
  1072.  {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
  1073.  
  1074. MACRO {ipl} {"Information Processing Letters"}
  1075.  
  1076. MACRO {jacm} {"Journal of the ACM"}
  1077.  
  1078. MACRO {jcss} {"Journal of Computer and System Sciences"}
  1079.  
  1080. MACRO {scp} {"Science of Computer Programming"}
  1081.  
  1082. MACRO {sicomp} {"SIAM Journal on Computing"}
  1083.  
  1084. MACRO {tocs} {"ACM Transactions on Computer Systems"}
  1085.  
  1086. MACRO {tods} {"ACM Transactions on Database Systems"}
  1087.  
  1088. MACRO {tog} {"ACM Transactions on Graphics"}
  1089.  
  1090. MACRO {toms} {"ACM Transactions on Mathematical Software"}
  1091.  
  1092. MACRO {toois} {"ACM Transactions on Office Information Systems"}
  1093.  
  1094. MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
  1095.  
  1096. MACRO {tcs} {"Theoretical Computer Science"}
  1097.  
  1098.  
  1099.  
  1100.  
  1101. READ
  1102.  
  1103.  
  1104.  
  1105.  
  1106. FUNCTION {sortify}
  1107. { purify$
  1108.   "l" change.case$
  1109. }
  1110.  
  1111. INTEGERS { len }
  1112.  
  1113. FUNCTION {chop.word}
  1114. { 's :=
  1115.   'len :=
  1116.   s #1 len substring$ =
  1117.     { s len #1 + global.max$ substring$ }
  1118.     's
  1119.   if$
  1120. }
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130. FUNCTION {sort.format.names}
  1131. { 's :=
  1132.   #1 'nameptr :=
  1133.   ""
  1134.   s num.names$ 'numnames :=
  1135.   numnames 'namesleft :=
  1136.     { namesleft #0 > }
  1137.     { nameptr #1 >
  1138.         { "   " * }
  1139.         'skip$
  1140.       if$
  1141.  
  1142.       s nameptr "{vv{ } }{ll{ }}{  ff{ }}{  jj{ }}" format.name$ 't :=
  1143.  
  1144.       nameptr numnames = t "others" = and
  1145.         { "et al" * }
  1146.         { t sortify * }
  1147.       if$
  1148.       nameptr #1 + 'nameptr :=
  1149.       namesleft #1 - 'namesleft :=
  1150.     }
  1151.   while$
  1152. }
  1153.  
  1154.  
  1155. FUNCTION {sort.format.title}
  1156. { 't :=
  1157.   "A " #2
  1158.     "An " #3
  1159.       "The " #4 t chop.word
  1160.     chop.word
  1161.   chop.word
  1162.   sortify
  1163.   #1 global.max$ substring$
  1164. }
  1165.  
  1166.  
  1167. FUNCTION {author.sort}
  1168. { author empty$
  1169.     { key empty$
  1170.         { "to sort, need author or key in " cite$ * warning$
  1171.           ""
  1172.         }
  1173.         { key sortify }
  1174.       if$
  1175.     }
  1176.     { author sort.format.names }
  1177.   if$
  1178. }
  1179.  
  1180. FUNCTION {author.editor.sort}
  1181. { author empty$
  1182.     { editor empty$
  1183.         { key empty$
  1184.             { "to sort, need author, editor, or key in " cite$ * warning$
  1185.               ""
  1186.             }
  1187.             { key sortify }
  1188.           if$
  1189.         }
  1190.         { editor sort.format.names }
  1191.       if$
  1192.     }
  1193.     { author sort.format.names }
  1194.   if$
  1195. }
  1196.  
  1197. FUNCTION {author.organization.sort}
  1198. { author empty$
  1199.     { organization empty$
  1200.         { key empty$
  1201.             { "to sort, need author, organization, or key in " cite$ * warning$
  1202.               ""
  1203.             }
  1204.             { key sortify }
  1205.           if$
  1206.         }
  1207.         { "The " #4 organization chop.word sortify }
  1208.       if$
  1209.     }
  1210.     { author sort.format.names }
  1211.   if$
  1212. }
  1213.  
  1214. FUNCTION {editor.organization.sort}
  1215. { editor empty$
  1216.     { organization empty$
  1217.         { key empty$
  1218.             { "to sort, need editor, organization, or key in " cite$ * warning$
  1219.               ""
  1220.             }
  1221.             { key sortify }
  1222.           if$
  1223.         }
  1224.         { "The " #4 organization chop.word sortify }
  1225.       if$
  1226.     }
  1227.     { editor sort.format.names }
  1228.   if$
  1229. }
  1230.  
  1231.  
  1232. FUNCTION {presort}
  1233.  
  1234. { type$ "book" =
  1235.  
  1236.   type$ "inbook" =
  1237.   or
  1238.     'author.editor.sort
  1239.     { type$ "proceedings" =
  1240.         'editor.organization.sort
  1241.         { type$ "manual" =
  1242.             'author.organization.sort
  1243.             'author.sort
  1244.           if$
  1245.         }
  1246.       if$
  1247.     }
  1248.   if$
  1249.  
  1250.   "    "
  1251.   *
  1252.   year field.or.null sortify
  1253.   *
  1254.   "    "
  1255.   *
  1256.   title field.or.null
  1257.   sort.format.title
  1258.   *
  1259.   #1 entry.max$ substring$
  1260.   'sort.key$ :=
  1261. }
  1262.  
  1263. ITERATE {presort}
  1264.  
  1265.  
  1266. SORT
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274. STRINGS { longest.label }
  1275.  
  1276. INTEGERS { number.label longest.label.width }
  1277.  
  1278. FUNCTION {initialize.longest.label}
  1279. { "" 'longest.label :=
  1280.   #1 'number.label :=
  1281.   #0 'longest.label.width :=
  1282. }
  1283.  
  1284. FUNCTION {longest.label.pass}
  1285. { number.label int.to.str$ 'label :=
  1286.   number.label #1 + 'number.label :=
  1287.   label width$ longest.label.width >
  1288.     { label 'longest.label :=
  1289.       label width$ 'longest.label.width :=
  1290.     }
  1291.     'skip$
  1292.   if$
  1293. }
  1294.  
  1295. EXECUTE {initialize.longest.label}
  1296.  
  1297. ITERATE {longest.label.pass}
  1298.  
  1299.  
  1300.  
  1301.  
  1302. FUNCTION {begin.bib}
  1303.  
  1304. { preamble$ empty$
  1305.  
  1306.     'skip$
  1307.     { preamble$ write$ newline$ }
  1308.   if$
  1309.   "\begin{thebibliography}{"  longest.label  * "}" * write$ newline$
  1310. }
  1311.  
  1312. EXECUTE {begin.bib}
  1313.  
  1314. EXECUTE {init.state.consts}
  1315.  
  1316.  
  1317. ITERATE {call.type$}
  1318.  
  1319.  
  1320. FUNCTION {end.bib}
  1321. { newline$
  1322.   "\end{thebibliography}" write$ newline$
  1323. }
  1324.  
  1325. EXECUTE {end.bib}
  1326.